package com.kavitha.db.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import com.mysql.jdbc.Driver;

public class PersistenceManager {
	
	
	public static Connection getConnection(){
		Driver driver;
		try {
			//Class.forName("com.mysql.jdbc.Driver");
			driver = new Driver();
			DriverManager.registerDriver(driver);
			Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/kavitha", "root", "mysql");
			return connection;
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}
}
